package com.xinghen.core.exception;

import com.xinghen.core.RestResponse;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author xinghen
 * @ClassName: ErrorResult
 * @Package: com.xinghen.core.exception
 * @Description 错误信息
 * @create 2017-12-07 15:39
 */
@Data
public class ErrorResult implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 异常时间
     */
    @ApiModelProperty(value = "异常时间", required = true, dataType = "date")
    private Date date;

    /**
     * 异常类名
     */
    @ApiModelProperty(value = "异常类名", required = true, dataType = "string")
    private String type;

    /**
     * 异常信息
     */
    @ApiModelProperty(value = "异常信息", required = true, dataType = "string")
    private String message;

    /**
     * 详细异常堆栈信息
     */
    @ApiModelProperty(value = "详细异常堆栈信息", required = true, dataType = "string")
    private String stackTrace;

    /**
     * 子异常
     */
    @ApiModelProperty(value = "子异常", required = true, dataType = "object")
    private RestResponse<String> child;

}
